package com.cloud.rocketmq.listener;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = "rocketTag", consumerGroup = "TagReceive", selectorExpression = "TAG1 || TAG2", selectorType = SelectorType.TAG)
public class TagConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String msg) {
        System.out.println("接受到的信息为" + msg);
    }
}